cast int to enum type c#

42

cast int to enum type c# -

YourEnum foo = (YourEnum)Enum.ToObject(typeof(YourEnum) , yourInt);

cast int to enum type c# -

YourEnum foo = (YourEnum)yourInt;

Comments

Submit
0 Comments